<?php

require_once 'minime.php';
date_default_timezone_set('Europe/Berlin');

$id = new Atom_Entry_Id("mimime:12345689");
$title = new Atom_Entry_Title("Tuomas is now following Pamela Anderson");
$content = new Atom_Entry_Content("Tuomas is now following Pamela Anderson", Atom_Entry_Content::TYPE_TEXTHTML);

// Link is not needed since we have content!
// How ever alternative link would be nice to have!

$as_actor = new Activitystream_Actor();
$as_actor->addChildElement(new Atom_Entry_Id("tuomas@lobstermonster.org"));
$as_actor->addChildElement(new Atom_Entry_Title("Tuomas Koski"));
// TODO: Needs link and activity-type!!
//// <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
//// <link rel="alternate" type="text/html" href="http://identi.ca/tkoski"/>
$atom = new Atom_Entry();

$atom->addChildElement($id);
$atom->addChildElement($title);
$atom->addChildElement($content);
$atom->addChildElement(new Atom_Entry_Updated());
$atom->addChildElement($as_actor);

$atom->addNamespace(Activitystream_Actor::AS_ACTOR_NS_PREFIX, Activitystream_Actor::AS_ACTOR_NS);

echo $atom;


//$entry = new AtomEntry($author, $title, $content, $id);
//
//$entry->setAuthor($author);
//$entry->setTitle("Tuomas Koski is now following Pamela Anderson.");
//$entry->setContent("Tuomas Koski is now following Pamela Anderson.", "html");
//$entry->setID("3GRE345DFG345FG3");
//
//
//$actor = new ActivityActor();
//// Activity actor should create something like this.
////<activity:actor>
//// <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
//// <id>http://identi.ca/user/52467</id>
//// <title>Tuomas Koski</title>
//// <link rel="alternate" type="text/html" href="http://identi.ca/tkoski"/>
////</activity:actor>
//$actor->setType(ActivityActor::TYPE_PERSON);
//$actor->setID(1234567);
//$actor->setTitle("Tuomas Koski");
//$actor->addLink("http://identi.ca/tkoski", "text/html", "alternate");
//
//$entry->setActivityActor($actor);
//
//
//$verb = new ActivityVerb();
//// <activity:verb>http://activitystrea.ms/schema/1.0/follow</activity:verb>
//$verb->setVerb(ActivityVerb::TYPE_FOLLOW);
//
//$entry->setActivityVerb($verb);




